package com.zsl.swing.redis.desktop.model;

public class CommandModel {

    public static final String REDIS_COMMAND_URL_FORMAT = "https://redis.io/commands/%s/";

    /**
     * 命令
     */
    private String cmd;

    /**
     * 描述
     */
    private String summary;

    /**
     * 参数
     */
    private String arguments;

    /**
     * 支持的版本
     */
    private String since;

    /**
     * 分组
     */
    private String group;

    /**
     * 时间复杂度
     */
    private String timeComplexity;

    /**
     * 语法
     */
    private String syntax;

    public String getSyntax() {
        return syntax;
    }

    public void setSyntax(String syntax) {
        this.syntax = syntax;
    }

    public String getTimeComplexity() {
        return timeComplexity;
    }

    public void setTimeComplexity(String timeComplexity) {
        this.timeComplexity = timeComplexity;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public String getCmd() {
        return cmd;
    }

    public void setCmd(String cmd) {
        this.cmd = cmd;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public String getArguments() {
        return arguments;
    }

    public void setArguments(String arguments) {
        this.arguments = arguments;
    }

    public String getSince() {
        return since;
    }

    public void setSince(String since) {
        this.since = since;
    }

    public String getHelpUrl(){
        return String.format(REDIS_COMMAND_URL_FORMAT, this.cmd.toLowerCase());
    }
}
